package com.itheima.a01threadcase1;

public class ThreadDemo1 {
    public static void main(String[] args) {
        //多线程的实现方式1   继承Thread类

        //1.创建一个线程对象
        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();

        //设置线程名称
        t1.setName("线程1");
        t2.setName("线程2");

        //2.开启线程
        t1.start();
        t2.start();

    }
}
